package com.example.camunda.dto;

import lombok.Data;
import org.camunda.bpm.engine.repository.Resource;

/**
 * 流程部署资源DTO
 *
 * @author heshao
 * @date 2021/11/9 15:56
 **/
@Data
public class DeploymentResourceDto {

    private String id;
    private String name;
    private String deploymentId;

    public static DeploymentResourceDto from(Resource resource) {
        DeploymentResourceDto dto = new DeploymentResourceDto();
        dto.id = resource.getId();
        dto.name = resource.getName();
        dto.deploymentId = resource.getDeploymentId();
        return dto;
    }
}
